/** 
* All Rights Reserved , Copyright (C) 2022 , 青岛鼎信通讯股份有限公司
* 
* SdProjectStakeholderServiceAuto
* SD项目相关方
* 
* 修改纪录
* 2022-01-04 版本：1.0 houyuhang 创建。
* @version 版本：1.0
* @author 作者：houyuhang
* 创建日期：2022-01-04
*/

package com.topscomm.gpm.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.gpm.*;
import com.topscomm.gpm.pojo.GpmProjectStakeholderEntity;
import com.topscomm.gpm.dao.IGpmProjectStakeholderDao;


public class GpmProjectStakeholderServiceAuto extends GpmService<GpmProjectStakeholderEntity, IGpmProjectStakeholderDao> {
	
	/**
	 * @author: houyuhang
	 * @date: 2022-01-04
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("projectlevel") != null) {
			temp = mapRow.get("projectlevel").toString();
			mapRow.put("dispprojectlevel", datacodeCache.getValueDynamic("GpmProjectLevel", temp, "code", "name"));
		}
		if (mapRow.get("stakeholdercategory") != null) {
			temp = mapRow.get("stakeholdercategory").toString();
			mapRow.put("dispstakeholdercategory", datacodeCache.getValueDynamic("GpmStakeholderCategory", temp, "code", "name"));
		}
		if (mapRow.get("messagecode") != null) {
			temp = mapRow.get("messagecode").toString();
			mapRow.put("dispmessagecode", datacodeCache.getValueDynamic("GpmStakeholderWorkGroup", temp, "code", "name"));
		}
		if (mapRow.get("grouprolecode") != null) {
			temp = mapRow.get("grouprolecode").toString();
			mapRow.put("dispgrouprolecode", datacodeCache.getValueDynamic("GpmProjectRole", temp, "code", "name"));
		}
		if (mapRow.get("stakeholderimpact") != null) {
			temp = mapRow.get("stakeholderimpact").toString();
			mapRow.put("dispstakeholderimpact", datacodeCache.getValueDynamic("GpmStakeholderImpact", temp, "code", "name"));
		}
		if (mapRow.get("managementstrategy") != null) {
			temp = mapRow.get("managementstrategy").toString();
			mapRow.put("dispmanagementstrategy", datacodeCache.getValueDynamic("GpmManagementStrategy", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "sdProjectStakeholderDao")
	public void setDao(IBasicDao<GpmProjectStakeholderEntity> dao) {
		super.setDao(dao);
	}
}
